# frozen_string_literal: true

require 'litecable'

# Sample chat application
module Ws
  class Connection < LiteCable::Connection::Base # :nodoc:
    identified_by :user, :sid

    def connect
      puts 'hello cable'
      #   @user = cookies['user']
      #   @sid = request.params['sid']
      reject_unauthorized_connection unless @user
      #   $stdout.puts "#{@user} connected"
    end

    def disconnect
      $stdout.puts 'disconnected'
    end
  end
end
